/**
 * 系统常量
 */
// eslint-disable-next-line no-undef
export const CLI_ENVS = __CLI_ENVS__; // 项目运行时变量
/**
 * TokenKey
 */
export const GLOBAL_SETTINGS_TOKENKEY = 'authorization';
/**
 * uni系统信息
 */
const { uniPlatform } = uni.getSystemInfoSync();
/**
 * uni-app 运行平台
 */
export const UNI_PLATFORM = uniPlatform;
/**
 * H5环境
 */
export const UNI_PLATFORM_H5 = UNI_PLATFORM === 'web' || UNI_PLATFORM === 'h5';
/**
 * 微信小程序环境
 */
export const UNI_PLATFORM_MP_WEIXIN = UNI_PLATFORM === 'mp-weixin';
/**
 * App环境
 */
export const UNI_PLATFORM_APP = UNI_PLATFORM === 'app';

/**
 * 系统参数：设备
 */
export const SYSTEM_PARAM_DEVICE = UNI_PLATFORM_H5 ? 'app-web' : UNI_PLATFORM;

/**
 * dev环境的基础链接
 */
export const DEV_BASE_URL = UNI_PLATFORM_H5
  ? CLI_ENVS.VUE_APP_SERVICE_PROXY_PREFIX
  : CLI_ENVS.VUE_APP_SERVICE_PROXY;
